/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*-  */
/*
 * catchit
 * Copyright (C) 2013 Ryan Grinkewitz <graphite@Toto>
 * 
 */

#ifndef _JUMPER_H_
#define _JUMPER_H_

#include "SDL/SDL.h"
#include "event-manager.h"
#include "constants.h"


const int JUMPER_DIAMETER = 18;
const int SPRITE_X_OFFSET = 5;
const int SPRITE_Y_OFFSET = 14;
const int PLAYER_VELOCITY = 7;

class Jumper
{
public:
	Jumper();
	~Jumper();

	virtual void processAction(Action action);

	void processTestAction(Action action);

	void setXPosition(int xPosition);
	int getXPosition();
	void setYPosition(int yPosition);
	int getYPosition();

	void setXVelocity(float xVelocity);
	float getXVelocity();
	void setYVelocity(float yVelocity);
	float getYVelocity();

	SDL_Rect* getCollisionBox();
	void setCollisionBox(SDL_Rect* collisionBox);
	
	void setSpriteId(int spriteId);
	int getSpriteId();

	void setIsOnPlatform(bool isOnPlatform){ this->isOnPlatform = isOnPlatform;};
	bool getIsOnPlatform(){return isOnPlatform;};

	void setLevel(int level);
	int getLevel();
	void setPlatform(int platform);
	int getPlatform();

	int getScore(){return score;};

	bool getIsPlayer(){return isPlayer;};
	void setIsPlayer(bool isPlayer){this->isPlayer = isPlayer;};

	bool getIsWinner(){return isWinner;};
	void setIsWinner(bool isWinner){this->isWinner = isWinner;};
	
protected:
	EventManager* eventManager;
	int xPosition;
	int yPosition;

	float yVelocity;
	float xVelocity;

	SDL_Rect* collisionBox;	

	bool isPlayer;
	bool isWinner;


	//current level the jumper is on
	//-1 for none.
	int level;
	//current platform index of current level the jumper is on
	//-1 for none.
	int platform;
	bool isOnPlatform;

	int highestLevelReached;
	int score;
private:





	int spriteId;



};

#endif // _JUMPER_H_

